/* eslint-disable @typescript-eslint/no-unused-vars */
import React, { useState } from 'react'
import { HashRouter as Router, Switch, Route } from "react-router-dom"
import Page1 from '../views/Page1'
// import 
export default function RouterView() {
    const [routeList, setRouteList]=useState([
        {
            id: 1,
            path: '/',
            component: Page1,
            exact: true
        },
    ])
    return (
        <Router>
            <Switch>
                {routeList.map(item => (
                    <Route path={item.path} key={item.id} component={item.component} exact={item.exact ?? false}></Route>
                ))}
            </Switch>
        </Router>
    )
}
